<%@page contentType="text/xml;charset=UTF-8" %><%@page import="be.destin.skos.core.SkosManager" %><%@page import="be.destin.skos.html.SkosHtmlManager" %><%@page import="be.destin.skos.core.SchemeInterface" %><%@page import="be.destin.skos.core.ConceptScheme" %><%@page import="be.destin.skos.core.XmlSource" %><%
	SkosHtmlManager skosHtmlManager = SkosHtmlManager.getAskosiSessionInstance(request);
	SkosManager skosManager = skosHtmlManager.getSkosManager();
	String schemeCode = request.getParameter("scheme");
	String topOnly = request.getParameter("toponly");
	boolean onlyTop = (topOnly != null && "on".equalsIgnoreCase(topOnly));
	SchemeInterface aScheme = skosManager.openScheme(schemeCode);
	if (aScheme != null) {
		XmlSource.marshall((ConceptScheme)aScheme, onlyTop, out);
	} else {
	%><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<conceptScheme about="<%=schemeCode %>"><error>NOT LOADED</error></conceptScheme><%
	}
%>
